Goal:

Think, explore, & write about what the co-evolutionary interaction between newts & snakes with different genetic architectures (GAs, combination of mutation rate & mutation effect size) can lead to. This markdown is investigation what is up with the different levels of correlation between different sizes of rectangles (in connection with GA1 tall). After fixing the row vs column error I looked at the correlation data and found that there was less correlation. To investigate why the correlation changed, I ran a few more experiments, testing how changing the area of local adaptation (the square size) might impact the spatial phenotype correlation calculations. This file contains results discussed in Tall_GA1!

Future experiment: Changing the interaction rate.

Questions:

How does grid size (area of local adaption) impact the spatial correlation of newt and snake phenotypes?

Prediction: There would be an optimum size of a grid, that captured a good amount of information. For example, a grid that was too large would contain to much information that was averaged over. A grid that was too small would not have enough individuals to make a meaningful calculation.

Experiment

I created a simulation study to observe the co-evolutionary outcome of the newt-snake interaction with different genetic architectures (GAs) in a spatial setting. I hypothesized that we would see an interaction (co-evolutionary arms race) between newt and snake phenotype under some GA combinations when newts and snakes were evolving over geographical space. Each GA is paired with another GA creating 16 combinations.

GA1 experiment values:

Landscape: A tall map!: 35*4 H, 35 W

I tested grid sizes for my tall landscape (all grids were square shaped):

The data

I ran 4 trials per GA combination. Each simulation collected whole population information, phenotype and population spatial correlations and local (grid) information. There are different spatial correlation and grid calculations for the different grid sizes (2-7). Each of these cancellations were done within a signal simulation so that comparison between grid sizes would be simplified. Each GA combination and trial has its own msprime simulation.

## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## head: : No such file or directory
## All cor, lit, and grid files exist!
## This program will now end!

Phenotype differences

This section examines how the whole population mean newt and snake phenotype changes over time. Red line represents the newts mean phenotype, while the blue line snake the snakes mean phenotype. The black line is the difference between snake ans newt mean phenotype. Newt and snake genetic architectures (GAs) are the same down the diagonal (top right to bottom left). As we move across the columns newt GA increases in mutational variance. As we move down the rows the mutational variance of snake GA increases. There are four simulations shown in each of theses figures.

The mean phenotype of newts and snakes follow similar patterns under the specific genetic architecture combinations (blue and red lines in each fig follow similar paths). In most cases it seems that the mean newt and snake phenotype increases over time. Most of the simulations reach a steady mean phenotype by 30,000 generations. When the mutational variance is low (first row for snakes and first column for newts) convolution does not see to be occurring. The mean phenotypes of newts and snakes are not symmetrical across the diagonal. This could indicate that there are different selection pressures for the newts and snakes.

Connection between higher phenotype and population (5 sec)

In some of my previous experiments there is a link between population size and average phenotype differences (snake - newt mean phenotype). When the snake population size was large the snakes had a higher phenotype. When newts had a larger phenotype, newts also had a larger population size. I present this plot again to confirm that it is still occurring (nothing unusual seen here).

Correlation

The next section examines the spatial correlation of the local mean phenotypes of snakes and newts. We predicted that in areas where newts phenotypes were large snakes phenotype would also be large. In areas where newt phenotype was small we predicted that snake phenotype would also be small. The prediction would result in a strong positive spatial correlation between newt and snake local phenotypes. I first present the spatial phenotype correlation for the entire simulation. The dashed line in the empirical newt-snake spatial correlation result. Each box plot represents one simulation trial. Trial 0 is the simulation that ran to 10,000 generations and trial 1 is the simulation that ran to 30,000 generations. (I ran things longer to see if the spatial phenotype correlation would improve with time).

2 Grid

3 Grid

4 Grid

5 Grid

6 Grid

7 Grid

It is difficult to tell what is happening as I decrease the size of the grids, but I think that some of the spatial correlations are getting closer to zero (less positive and less negative).

Correlation In Time Chunks

In order to understand how spatial correlations where changing with time I took 5,000 generation time slices to look at the correlation values for all four trials. Each color is a different grid size and contains information from all four trials.

Plot 1

Plot 2

Plot 3

Plot 4

Plot 5

Plot 6

Plot 7

Plot 8

Plot 9

Plot 10

From this figure set, is clear to see that the smaller the grid size the less variance across simulations and the closer the result is to 0. Oddly, there seems to be some arc patterns when the GA has minimal variance (first row and first column). This section leads me to conclude that grid sizes 2 and 3 are too large and grid sizes 6 and 7 are too small.

Phenotype Correlation across time

Next, we will examine three randomly chosen plots from this experiment. Time (in generations) in on the x-axis and both mean phenotype and phenotype spatial correlation in on the y-axis. Newt whole population mean phenotype is red, while snake mean phenotype is blue. The different color lines are the phenotype spatial correlation colored by grid size. Color from largest grid to smallest grid: red, yellow, green, light blue, dark blue, and pink.

Random 1

Random 2

Random 3

Mean newt and snake phenotypes can either go up, go down, or stay constant near zero. Sometimes the mean phenotypes go down together, other times they both go up. Occasionally, one species phenotype goes up while the other species phenotype stays constant. In all of these cases the spatial correlation is the most extreme when the grid size is large and close to 0 when the grid size is small.

Population Size Correlation across time

Next, we will examine the population sized of the three randomly chosen simulations (same simulations from above). Time (in generations) in on the x-axis and both mean population size and population size spatial correlation in on the y-axis. Newt population size is red, while snake phenotype size is blue. The different color lines are the popualtion size spatial correlation colored by grid size. Color from largest grid to smallest grid: red, yellow, green, light blue, dark blue, and pink.

Random 1

Random 2

Random 3

Newt and snake population size intentionally goes up, then can stay constant or increase/decrease with time. In all of these cases the spatial correlation is the most extreme when the grid size is large and closer to 0 when the grid size is small. The correlation between newt and snake population size is always positive. Its gets smaller as the number of grids increases (grid size gets smaller) due to the way slim is not taking the smaller edge/corner areas when calculating the correlation (easy to see in the grid figs).

Grid Figs

In this last section I show the local mean phenotype and population size of newts (circles) and snakes (square) for the different grid sizes. In the mean phenotype plot, the more resistant or toxic a snake or newt is the more yellow the square or circle. In the population size plot, the larger a local population is the more bright/yellow the circle or square is. There is a small sub plot showing the individual newt and snake values (phenotype or population size) colored by location in the artificial map.

Overall: As the number of grids increase the spatial correlation (both phenotype and population size) gets closer to zero. I do not understand why there is no positive phenotype correlation in these plots and I also do not entirely understand why the correlation gets closer to zero. I do understand why the correlation gets smaller in the population grid plots, it is due to the edge calculations (seen in the sub plots).

2

## [1] -0.7246164

3

## [1] -0.569682

4

## [1] -0.5537013

5

## [1] -0.4917715

6

## [1] -0.4901348

7

## [1] -0.4599831

2 Pop Size

## [1] 0.6959037

3 Pop Size

## [1] 0.6944509

4 Pop Size

## [1] 0.5828449

5 Pop Size

## [1] 0.3952111

6 Pop Size

## [1] 0.3102577

7 Pop Size

## [1] 0.1615903

## {-}